#include<bits/stdc++.h>
using namespace std;
int t,a[105],b[101];
int main()
{
   freopen("color.in","r",stdin);
   freopen("color.out","w",stdout);
   cin>>t;
   for(int i=1;i<=t;i++)
   {
       cin>>a[i];
       for(int j=1;j<=a[i];j++)
       {
           cin>>b[j];
       }
   }
   cout<<"1"<<endl<<"0"<<endl<<"8";
   return 0;
}

